#include "SList_DLLead.h"

void test01()
{
    DLTNode *pList = DLTInit(pList);

    DLTPushBack(pList,0);
    DLTPushBack(pList,1);
    DLTPushBack(pList,2);
    DLTPushBack(pList,3);
    DLTPushBack(pList,4);
    DLTPushBack(pList,5);
    printf("尾插：\n");
    DLTPrint(pList);

    DLTPopBack(pList);
    DLTPopBack(pList);
    printf("尾删：\n");
    DLTPrint(pList);

    DLTPushFront(pList,10);
    DLTPushFront(pList,11);
    DLTPushFront(pList,12);
    printf("头插：\n");
    DLTPrint(pList);

    DLTPopFront(pList);
    DLTPopFront(pList);
    DLTPopFront(pList);
    printf("头删：\n");
    DLTPrint(pList);
}
void test02()
{
    DLTNode *pList = DLTInit(pList);

    DLTPushBack(pList,1);
    DLTPushBack(pList,2);
    DLTPushBack(pList,3);
    DLTPushBack(pList,4);
    printf("尾插：\n");
    DLTPrint(pList);

    DLTNode *pos = DLTFind(pList,3);
    if(pos)
    {
        DLTErase(pos);
        pos = NULL;
    }
    DLTPrint(pList);

    DLTDestory(pList);
    pList = NULL;
}
// int main()
// {
//     //test01();
//     test02();

//     system("pause");
//     return 0;
// }